<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="./bootstrap.min.css">
    <!-- <script src="./bootstrap.min.js"></script> -->
    <style>
        .row {
            height: 100px;
        }

        .div1 {
            background-color: #f0f0f0;
        }

        .div2 {
            background-color: #999;
        }

        .div3 {
            height: 200px;
            background-color: #000;
        }
    </style>
</head>

<body>
    <!-- 先引入css和js的资源 -->
    <button type="button" class="btn btn-danger">Left</button>
    <div class="container">
        <div class="row">
            <div class="div1 col-sm-6 col-md-8 col-lg-8">.col-md-8</div>
            <div class="div2 col-sm-6 col-md-4 col-lg-4">.col-md-4</div>
        </div>
        <!-- 居中 通过offset偏移量完成 -->
        <div class="row">
            <div class="div3 col-md-6 col-md-offset-3"></div>
        </div>
    </div>
    <p class="text-right">Center aligned text.</p>
    <div class="container">
        <div class="input-group">
            <span class="input-group-addon" id="basic-addon1">@</span>
            <input type="text" class="form-control" placeholder="Username" aria-describedby="basic-addon1">
        </div>
    </div>
</body>

</html>